from django.urls import path
from . import views
from .views import ding_url, ding_back
from .views import handle_dingcode
urlpatterns = [
    path('login/', views.LoginView.as_view(), name='login'),
    path('dingtalk/login/', ding_url, name='dingtalk-login'),  # 钉钉登录URL（生成扫码链接）
    path('dingtalk/callback/', ding_back, name='dingtalk-callback'),  # 钉钉回调URL（处理扫码后的逻辑）
    path('dingtalk/handle-code/', handle_dingcode, name='dingtalk-handle-code'),  # 新增接口路由
    path("send_code/", views.VerifyCodeLoginView.as_view(), name="send_code"),  # 发送验证码
    path("code_login/", views.RegisterView.as_view(), name="verify_login"),
]